var util = require('util');
var Decorator = require('./decorator.js');

var decorator = new Decorator();

/**
 * 装饰接口的实现类A
 */
function ConcreteDecoratorA() {
  Decorator.call(this);
  this.operation = function() {
    decorator.operation();
    addedState();
    console.info('add some decorator by ConcreteDecoratorA');
  };
}

/**
 * private method
 * @return {[type]} [description]
 */
function addedState() {
  console.info('ConcreteDecoratorA private method addedState');
}

util.inherits(ConcreteDecoratorA, Decorator);

module.exports = ConcreteDecoratorA;